package com.ruoyi.huoxingshi.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.huoxingshi.mapper.HxsEpisodesMapper;
import com.ruoyi.huoxingshi.domain.HxsEpisodes;
import com.ruoyi.huoxingshi.service.IHxsEpisodesService;

/**
 * 短剧选集Service业务层处理
 * 
 * @author huoxingshi
 * @date 2025-06-27
 */
@Service
public class HxsEpisodesServiceImpl implements IHxsEpisodesService 
{
    @Autowired
    private HxsEpisodesMapper hxsEpisodesMapper;

    /**
     * 查询短剧选集
     * 
     * @param id 短剧选集主键
     * @return 短剧选集
     */
    @Override
    public HxsEpisodes selectHxsEpisodesById(Long id)
    {
        return hxsEpisodesMapper.selectHxsEpisodesById(id);
    }

    /**
     * 查询短剧选集列表
     * 
     * @param hxsEpisodes 短剧选集
     * @return 短剧选集
     */
    @Override
    public List<HxsEpisodes> selectHxsEpisodesList(HxsEpisodes hxsEpisodes)
    {
        return hxsEpisodesMapper.selectHxsEpisodesList(hxsEpisodes);
    }

    /**
     * 新增短剧选集
     * 
     * @param hxsEpisodes 短剧选集
     * @return 结果
     */
    @Override
    public int insertHxsEpisodes(HxsEpisodes hxsEpisodes)
    {
        hxsEpisodes.setCreateTime(DateUtils.getNowDate());
        return hxsEpisodesMapper.insertHxsEpisodes(hxsEpisodes);
    }

    /**
     * 修改短剧选集
     * 
     * @param hxsEpisodes 短剧选集
     * @return 结果
     */
    @Override
    public int updateHxsEpisodes(HxsEpisodes hxsEpisodes)
    {
        hxsEpisodes.setUpdateTime(DateUtils.getNowDate());
        return hxsEpisodesMapper.updateHxsEpisodes(hxsEpisodes);
    }

    /**
     * 批量删除短剧选集
     * 
     * @param ids 需要删除的短剧选集主键
     * @return 结果
     */
    @Override
    public int deleteHxsEpisodesByIds(Long[] ids)
    {
        return hxsEpisodesMapper.deleteHxsEpisodesByIds(ids);
    }

    /**
     * 删除短剧选集信息
     * 
     * @param id 短剧选集主键
     * @return 结果
     */
    @Override
    public int deleteHxsEpisodesById(Long id)
    {
        return hxsEpisodesMapper.deleteHxsEpisodesById(id);
    }
}
